package top.songxs.gmall.user.rpc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.user.biz.UserBizService;
import top.songxs.gmall.user.entity.UserAddress;

import java.util.List;

@RestController
@RequestMapping("/api/inner/user")
public class UserRpcController {

    @Autowired
    private UserBizService userBizService ;

    @GetMapping(value = "/address/getUserAllAddress")
    public Result<List<UserAddress>> getUserAllAddress() {
        List<UserAddress> allUserAddress = userBizService.getAllUserAddress();
        return Result.build(allUserAddress , ResultCodeEnum.SUCCESS) ;
    }

}
